home *** CD-ROM | disk | FTP | other *** search
- global gMaster, gMasterImagesPath, gMasterDocPath, gNotes, gPath, gFolderName4, gFolderName1, gFolderName2, gFolderName3, gMasterFolder, gMasterNotesPath, gMasterLogosPath, gMasterPosterPath
-
- on mGatherOtherLargeNames
- repeat with w = 1 to gMaster.pSummaryList.count
- vSmallName = gMaster.pSummaryList[w].pSmallName
- repeat with g = 1 to gMaster.pPosterList.count
- if gMaster.pPosterList[g].pSmallName = vSmallName then
- gMaster.pSummaryList[w].pLargeName = gMaster.pPosterList[g].pLargeName
- end if
- end repeat
- end repeat
- repeat with w = 1 to gMaster.pSummaryList.count
- vSmallName = gMaster.pSummaryList[w].pSmallName
- repeat with g = 1 to gMaster.pLogoList.count
- if gMaster.pLogoList[g].pSmallName = vSmallName then
- gMaster.pSummaryList[w].pLargeName = gMaster.pLogoList[g].pLargeName
- end if
- end repeat
- end repeat
- repeat with w = 1 to gMaster.pSummaryList.count
- if gMaster.pSummaryList[w].pType = "productionNotes" then
- gMaster.pSummaryList[w].pLargeName = gNotes.pProductionFileNamePDFenglish
- exit repeat
- end if
- end repeat
- repeat with w = 1 to gMaster.pSummaryList.count
- if gMaster.pSummaryList[w].pType = "productionCredits" then
- gMaster.pSummaryList[w].pLargeName = gNotes.pProductionFileNamePDFenglish
- exit repeat
- end if
- end repeat
- end
-
- on mGatherDownloadInfo
- vTempTotal = 0
- vFileTotal = 0
- repeat with x = 1 to gMaster.pSummaryList.count
- if gMaster.pSummaryList[x].pSelected = "yes" then
- vFileTotal = vFileTotal + 1
- case gMaster.pSummaryList[x].pType of
- "productionNotes":
- vFromPath = gMaster.pMasterPath & gMaster.pInternalFolders.notesfolder & gMaster.pPlatformSymbol
- if gMaster.pLanguageMode = "english" then
- vLargeName1 = gNotes.pProductionFileNamePDFenglish
- vLargeName2 = gNotes.pProductionFileNameDOCenglish
- else
- vLargeName1 = gNotes.pProductionFileNamePDFspanish
- vLargeName2 = gNotes.pProductionFileNameDOCspanish
- end if
- "productionCredits":
- vFromPath = gMaster.pMasterPath & gMaster.pInternalFolders.notesfolder & gMaster.pPlatformSymbol
- if gMaster.pLanguageMode = "english" then
- vLargeName1 = gNotes.pCreditsFileNamePDFenglish
- vLargeName2 = gNotes.pCreditsFileNameDOCenglish
- else
- vLargeName1 = gNotes.pCreditsFileNamePDFspanish
- vLargeName2 = gNotes.pCreditsFileNameDOCspanish
- end if
- "poster":
- vFromPath = gMaster.pMasterPath & gMaster.pInternalFolders.posterfolder & gMaster.pPlatformSymbol
- vLargeName1 = gMaster.pSummaryList[x].pLargeName
- vLargeName2 = 0
- "logo":
- vFromPath = gMaster.pMasterPath & gMaster.pInternalFolders.logosfolder & gMaster.pPlatformSymbol
- vLargeName1 = gMaster.pSummaryList[x].pLargeName
- vLargeName2 = 0
- "photo":
- vFromPath = gMaster.pMasterPath & gMaster.pInternalFolders.imagesfolder & gMaster.pPlatformSymbol
- vLargeName1 = gMaster.pSummaryList[x].pLargeName
- vLargeName2 = 0
- otherwise:
- alert("you have a problem Los Angeles")
- end case
- vSize = baFileSize(vFromPath & vLargeName1)
- vTempTotal = vTempTotal + value(vSize)
- if vLargeName2 <> 0 then
- vSize = baFileSize(vFromPath & vLargeName2)
- vTempTotal = vTempTotal + value(vSize)
- end if
- end if
- end repeat
- if vTempTotal = 0 then
- vText = "you haven't selected any files to download"
- vText2 = EMPTY
- else
- vTempTotal2 = vTempTotal / 1024
- vTempTotal3 = vTempTotal / 1024 / 1024
- if vTempTotal3 > 1 then
- vMegs = "megs"
- vText2 = "You will need about " & vTempTotal3 & " " & vMegs & " of hard drive space for this download."
- else
- vMegs = "meg"
- vText2 = "You will need less than one meg of hard drive space for this download."
- end if
- vText = "You have selected " & vFileTotal & " files to download"
- end if
- return vText & RETURN & vText2
- end
-
- on GatherInfo vMode
- gFolderName1 = gMaster.pGeneralSettings.title
- gFolderName2 = gMaster.pExternalFolders.imagesfolder
- gFolderName3 = gMaster.pExternalFolders.docsfolder
- gFolderName4 = gMaster.pExternalFolders.notesfolder
- gFolderName5 = gMaster.pExternalFolders.logosfolder
- gFolderName6 = gMaster.pExternalFolders.posterfolder
- case vMode of
- "desktop":
- gPath = baSysFolder("desktop")
- gMasterFolder = gPath & gFolderName1 & gMaster.pPlatformSymbol
- gMasterImagesPath = gMasterFolder & gFolderName2 & gMaster.pPlatformSymbol
- gMasterDocPath = gMasterFolder & gFolderName3 & gMaster.pPlatformSymbol
- gMasterNotesPath = gMasterFolder & gFolderName4 & gMaster.pPlatformSymbol
- gMasterLogosPath = gMasterFolder & gFolderName5 & gMaster.pPlatformSymbol
- gMasterPosterPath = gMasterFolder & gFolderName6 & gMaster.pPlatformSymbol
- "harddrive":
- fileObj = xtra("FileXtra4").new()
- gPath = fx_FolderSelectDialog(fileObj, "aaa")
- gMasterFolder = gPath & gFolderName1 & gMaster.pPlatformSymbol
- gMasterImagesPath = gMasterFolder & gFolderName2 & gMaster.pPlatformSymbol
- gMasterDocPath = gMasterFolder & gFolderName3 & gMaster.pPlatformSymbol
- gMasterNotesPath = gMasterFolder & gFolderName4 & gMaster.pPlatformSymbol
- gMasterLogosPath = gMasterFolder & gFolderName5 & gMaster.pPlatformSymbol
- gMasterPosterPath = gMasterFolder & gFolderName6 & gMaster.pPlatformSymbol
- end case
- end
-
- on MasterSaveShowDialog
- vText = mGatherDownloadInfo()
- sprite(152).member.text = vText
- showFlashDialog()
- end
-
- on MasterSave vWhichOne, vMode
- case vWhichOne of
- "deskTop":
- GatherInfo("deskTop")
- "harddrive":
- GatherInfo("harddrive")
- end case
- vPoster = 0
- vOK = "no"
- repeat with x = 1 to gMaster.pPhotoList.count
- if gMaster.pPhotoList[x].pSelected = "yes" then
- vOK = "yes"
- exit repeat
- end if
- end repeat
- repeat with x = 1 to gMaster.pPosterList.count
- if gMaster.pPosterList[x].pSelected = "yes" then
- vOK = "yes"
- exit repeat
- end if
- end repeat
- case vOK of
- "no":
- nothing()
- "yes":
- nothing()
- otherwise:
- alert(" you have a problem with vOK")
- end case
- OK = baCreateFolder(gMasterFolder & gFolderName2 & gMaster.pPlatformSymbol)
- vSkip = "yes"
- repeat with x = 1 to gMaster.pPhotoList.count
- if gMaster.pPhotoList[x].pSelected = "yes" then
- vName = gMaster.pPhotoList[x].pLargeName
- if gMaster.pPhotoList[x].pOKtoDownload = "yes" then
- if baFileExists(gMaster.pMasterPath & gMaster.pInternalFolders.imagesfolder & gMaster.pPlatformSymbol & vName) = 1 then
- mGatherDownloadInfo(gMaster.pMasterPath & gMaster.pInternalFolders.imagesfolder & gMaster.pPlatformSymbol & vName)
- vFromPath = gMaster.pMasterPath & gMaster.pInternalFolders.imagesfolder & gMaster.pPlatformSymbol
- vTemp = (the environment).productVersion
- if the platform contains "Mac" then
- case vTemp of
- "8.5.1", "8.5":
- oneFile = new(xtra("progresscopy"), 1, 100, 100)
- copyFile(oneFile, vFromPath & vName, gMasterImagesPath & vName, 1, 1, 1)
- oneFile = 0
- otherwise:
- OK = baCopyFileProgress(vFromPath & vName, gMasterImagesPath & vName, "always", "Downloading files... ", "Cancel", 0)
- end case
- else
- OK = baCopyFileProgress(vFromPath & vName, gMasterImagesPath & vName, "always", "Downloading files... ", "Cancel", 0)
- end if
- vSkip = "no"
- end if
- end if
- end if
- end repeat
- if vSkip = "no" then
- CaptionCode(gPath)
- end if
- SavePoster()
- SaveLogos()
- if vMode = "with" then
- SaveNotes()
- end if
- end
-
- on SavePoster
- vSkip = "yes"
- repeat with x = 1 to gMaster.pPosterList.count
- if gMaster.pPosterList[x].pSelected = "yes" then
- vSkip = "no"
- exit repeat
- end if
- end repeat
- if vSkip = "yes" then
- exit
- else
- vFromPath = gMaster.pMasterPath & gMaster.pInternalFolders.posterfolder & gMaster.pPlatformSymbol
- vToPath = gMasterPosterPath
- OK = baCreateFolder(gMasterPosterPath)
- repeat with x = 1 to gMaster.pPosterList.count
- if gMaster.pPosterList[x].pSelected = "yes" then
- vlargeName = gMaster.pPosterList[x].pLargeName
- if baFileExists(vFromPath & vlargeName) = 1 then
- vTemp = (the environment).productVersion
- if the platform contains "Mac" then
- case vTemp of
- "8.5.1", "8.5":
- put "posterfound 8.5.1"
- oneFile = new(xtra("progresscopy"), 1, 100, 100)
- copyFile(oneFile, vFromPath & vlargeName, vToPath & vlargeName, 1, 1, 1)
- oneFile = 0
- otherwise:
- put "posterfound 9.0"
- OK = baCopyFileProgress(vFromPath & vlargeName, vToPath & vlargeName, "always", "Downloading files... ", "Cancel", 0)
- end case
- next repeat
- end if
- put "posterfound 9.0 Win"
- OK = baCopyFileProgress(vFromPath & vlargeName, vToPath & vlargeName, "always", "Downloading files... ", "Cancel", 0)
- end if
- end if
- end repeat
- end if
- end
-
- on SaveLogos
- vSkip = "yes"
- repeat with x = 1 to gMaster.pLogoList.count
- if gMaster.pLogoList[x].pSelected = "yes" then
- vSkip = "no"
- exit repeat
- end if
- end repeat
- if vSkip = "yes" then
- exit
- else
- vFromPath = gMaster.pMasterPath & gMaster.pInternalFolders.logosfolder & gMaster.pPlatformSymbol
- vToPath = gMasterLogosPath
- OK = baCreateFolder(vToPath)
- repeat with x = 1 to gMaster.pLogoList.count
- if gMaster.pLogoList[x].pSelected = "yes" then
- vlargeName = gMaster.pLogoList[x].pLargeName
- if baFileExists(vFromPath & vlargeName) = 1 then
- vTemp = (the environment).productVersion
- if the platform contains "Mac" then
- case vTemp of
- "8.5.1", "8.5":
- put "logofound 8.5.1"
- oneFile = new(xtra("progresscopy"), 1, 100, 100)
- copyFile(oneFile, vFromPath & vlargeName, vToPath & vlargeName, 1, 1, 1)
- oneFile = 0
- otherwise:
- OK = baCopyFileProgress(vFromPath & vlargeName, vToPath & vlargeName, "always", "Downloading files... ", "Cancel", 0)
- end case
- next repeat
- end if
- put "logofound 9.0"
- OK = baCopyFileProgress(vFromPath & vlargeName, vToPath & vlargeName, "always", "Downloading files... ", "Cancel", 0)
- put "logofound 9.0 Win"
- end if
- end if
- end repeat
- end if
- end
-
- on SaveNotesOnly
- if (gMasterImagesPath = EMPTY) or (gMasterDocPath = EMPTY) then
- GatherInfo("deskTop")
- OK = baCreateFolder(gMasterFolder & gFolderName2 & gMaster.pPlatformSymbol)
- SaveNotes()
- else
- SaveNotes()
- end if
- end
-
- on SaveNotes
- vSkip = "yes"
- vP = gNotes.pProductionSelected
- vC1 = gNotes.pCastSelected
- vC2 = gNotes.pCreditsSelected
- vF = gNotes.pFilmmakerSelected
- if (vP = "yes") or (vC1 = "yes") or (vC2 = "yes") or (vF = "yes") then
- vSkip = "no"
- end if
- if vSkip = "yes" then
- exit
- else
- vFromPath = gMaster.pMasterPath & gMaster.pInternalFolders.notesfolder & gMaster.pPlatformSymbol
- vToPath = gMasterNotesPath
- OK = baCreateFolder(gMasterNotesPath)
- if vP = "yes" then
- if gMaster.pLanguageMode = "english" then
- vNotesPDF = gNotes.pProductionFileNamePDFenglish
- vNotesDOC = gNotes.pProductionFileNameDOCenglish
- else
- vNotesPDF = gNotes.pProductionFileNamePDFspanish
- vNotesDOC = gNotes.pProductionFileNameDOCspanish
- end if
- if (baFileExists(vFromPath & vNotesPDF) = 1) and (baFileExists(vFromPath & vNotesDOC) = 1) then
- vTemp = (the environment).productVersion
- if the platform contains "Mac" then
- case vTemp of
- "8.5.1", "8.5":
- oneFile = new(xtra("progresscopy"), 1, 100, 100)
- copyFile(oneFile, vFromPath & vNotesPDF, vToPath & vNotesPDF, 1, 1, 1)
- copyFile(oneFile, vFromPath & vNotesDOC, vToPath & vNotesDOC, 1, 1, 1)
- oneFile = 0
- otherwise:
- OK2 = baCopyFileProgress(vFromPath & vNotesPDF, vToPath & vNotesPDF, "always", "Downloading files... ", "Cancel", 0)
- OK3 = baCopyFileProgress(vFromPath & vNotesDOC, vToPath & vNotesDOC, "always", "Downloading files... ", "Cancel", 0)
- end case
- else
- OK2 = baCopyFileProgress(vFromPath & vNotesPDF, vToPath & vNotesPDF, "always", "Downloading files... ", "Cancel", 0)
- OK3 = baCopyFileProgress(vFromPath & vNotesDOC, vToPath & vNotesDOC, "always", "Downloading files... ", "Cancel", 0)
- end if
- end if
- end if
- if vC1 = "yes" then
- vNotesPDF = gNotes.pCastFileNamePDF
- vNotesDOC = gNotes.pCastFileNameDOC
- if (baFileExists(vFromPath & vNotesPDF) = 1) and (baFileExists(vFromPath & vNotesDOC) = 1) then
- vTemp = (the environment).productVersion
- if the platform contains "Mac" then
- case vTemp of
- "8.5.1", "8.5":
- oneFile = new(xtra("progresscopy"), 1, 100, 100)
- copyFile(oneFile, vFromPath & vNotesPDF, vToPath & vNotesPDF, 1, 1, 1)
- copyFile(oneFile, vFromPath & vNotesDOC, vToPath & vNotesDOC, 1, 1, 1)
- oneFile = 0
- otherwise:
- OK2 = baCopyFileProgress(vFromPath & vNotesPDF, vToPath & vNotesPDF, "always", "Downloading files... ", "Cancel", 0)
- OK3 = baCopyFileProgress(vFromPath & vNotesDOC, vToPath & vNotesDOC, "always", "Downloading files... ", "Cancel", 0)
- end case
- else
- OK2 = baCopyFileProgress(vFromPath & vNotesPDF, vToPath & vNotesPDF, "always", "Downloading files... ", "Cancel", 0)
- OK3 = baCopyFileProgress(vFromPath & vNotesDOC, vToPath & vNotesDOC, "always", "Downloading files... ", "Cancel", 0)
- end if
- end if
- end if
- if vC2 = "yes" then
- if gMaster.pLanguageMode = "english" then
- vNotesPDF = gNotes.pCreditsFileNamePDFenglish
- vNotesDOC = gNotes.pCreditsFileNameDOCenglish
- else
- vNotesPDF = gNotes.pCreditsFileNamePDFspanish
- vNotesDOC = gNotes.pCreditsFileNameDOCspanish
- end if
- if (baFileExists(vFromPath & vNotesPDF) = 1) and (baFileExists(vFromPath & vNotesDOC) = 1) then
- vTemp = (the environment).productVersion
- if the platform contains "Mac" then
- case vTemp of
- "8.5.1", "8.5":
- put "creditnotesfound 8.5.1"
- oneFile = new(xtra("progresscopy"), 1, 100, 100)
- copyFile(oneFile, vFromPath & vNotesPDF, vToPath & vNotesPDF, 1, 1, 1)
- copyFile(oneFile, vFromPath & vNotesDOC, vToPath & vNotesDOC, 1, 1, 1)
- oneFile = 0
- otherwise:
- OK2 = baCopyFileProgress(vFromPath & vNotesPDF, vToPath & vNotesPDF, "always", "Downloading files... ", "Cancel", 0)
- OK3 = baCopyFileProgress(vFromPath & vNotesDOC, vToPath & vNotesDOC, "always", "Downloading files... ", "Cancel", 0)
- end case
- else
- put "creditnotesfound 9.0"
- put "creditnotesfound 9.0 win"
- OK2 = baCopyFileProgress(vFromPath & vNotesPDF, vToPath & vNotesPDF, "always", "Downloading files... ", "Cancel", 0)
- OK3 = baCopyFileProgress(vFromPath & vNotesDOC, vToPath & vNotesDOC, "always", "Downloading files... ", "Cancel", 0)
- end if
- end if
- end if
- if vF = "yes" then
- vNotesPDF = gNotes.pFilmmakerFileNamePDF
- vNotesDOC = gNotes.pFilmmakerFileNameDOC
- if (baFileExists(vFromPath & vNotesPDF) = 1) and (baFileExists(vFromPath & vNotesDOC) = 1) then
- vTemp = (the environment).productVersion
- if the platform contains "Mac" then
- case vTemp of
- "8.5.1", "8.5":
- oneFile = new(xtra("progresscopy"), 1, 100, 100)
- copyFile(oneFile, vFromPath & vNotesPDF, vToPath & vNotesPDF, 1, 1, 1)
- copyFile(oneFile, vFromPath & vNotesDOC, vToPath & vNotesDOC, 1, 1, 1)
- oneFile = 0
- otherwise:
- OK2 = baCopyFileProgress(vFromPath & vNotesPDF, vToPath & vNotesPDF, "always", "Downloading files... ", "Cancel", 0)
- OK3 = baCopyFileProgress(vFromPath & vNotesDOC, vToPath & vNotesDOC, "always", "Downloading files... ", "Cancel", 0)
- end case
- else
- OK2 = baCopyFileProgress(vFromPath & vNotesPDF, vToPath & vNotesPDF, "always", "Downloading files... ", "Cancel", 0)
- OK3 = baCopyFileProgress(vFromPath & vNotesDOC, vToPath & vNotesDOC, "always", "Downloading files... ", "Cancel", 0)
- end if
- end if
- end if
- end if
- end
-
- on getDestFromUser vFolder
- fileObj = xtra("FileXtra4").new()
- if the platform contains "Mac" then
- thePath = fileObj.fx_FileSaveAsDialog("Macintosh HD:", vFolder, "Save")
- else
- thePath = fileObj.fx_FileSaveAsDialog(the moviePath, vFolder, "Save", 1)
- end if
- fileObj = 0
- end
-
- on testNotes
- if baFileExists(the moviePath & "notes:note1.rtf") = 1 then
- put "yes it can find the file"
- end if
- end
-
- on testNotes2
- global fileObj, gOrginalNotesPath
- if the platform contains "Mac" then
- gOrginalNotesPath = the moviePath & "notes:"
- else
- gOrginalNotesPath = the moviePath & "notes\"
- end if
- fileObj = xtra("FileXtra4").new()
- if fx_FileExists(fileObj, gOrginalNotesPath & "jerryfix.dir") = 1 then
- x = gOrginalNotesPath & "jerryfix.dir"
- y = the moviePath & "Antwone Fisher:docs:jerryfix2.dir"
- fx_FileCopy(fileObj, x, y)
- vError = fileObj.fx_ErrorString()
- fileObj = 0
- end if
- put vError
- end
-